<template>
  <div>
    <el-card class="box-card">
      <div style="display: flex;align-items: center;padding-top: 20px;">
        <el-form ref="form" :model="form" label-width="80px" style="display: flex;">
          <el-form-item label="商品类型搜索" style="width: 400px;height: 50px;">
            <el-input v-model="form.name" placeholder="请输入" />
          </el-form-item>
          <el-button type="primary" icon="el-icon-search" style="width: 100px;height: 40px;margin-left: 30px;">查询
          </el-button>
        </el-form>
      </div>

    </el-card>
    <el-card class="box-card2">
      <el-button type="primary" icon="el-icon-circle-plus" style="background-color: #ff6a28;border: none;">新建</el-button>

      <el-table
        :data="tableData"
        style="width: 100%"
      >
        <el-table-column
          prop="date"
          label="序号"
        >
          <template v-slot="{$index}">
            {{ $index }}
          </template>

        </el-table-column>
        <el-table-column
          prop="name"
          label="商品类型名称"
        />
        <el-table-column
          label="操作"
        >
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="handleClick(scope.row)">修改</el-button>
            <el-button type="text">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>
<script>
export default {
  name: '',
  data() {
    return {
      form: {},
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1518 弄',
        zip: 200333
      }, {
        date: '2016-05-04',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1517 弄',
        zip: 200333
      }, {
        date: '2016-05-01',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1519 弄',
        zip: 200333
      }, {
        date: '2016-05-03',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1516 弄',
        zip: 200333
      }]
    }
  },
  computed: {
  },
  created() {
  },
  methods: {
    handleClick(row) {
      console.log(row)
    }
  }
}
</script>
<style lang='scss'  scoped>

.box-card{
  margin-bottom: 20px;
}
</style>
